﻿<%@ Page Language="C#" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>SlideShow</title>

    <script runat="Server" type="text/C#">
        [System.Web.Services.WebMethod]
        [System.Web.Script.Services.ScriptMethod]

        public static AjaxControlToolkit.Slide[] GetSlides()
        {
            AjaxControlToolkit.Slide[] slides = new AjaxControlToolkit.Slide[5];
            slides[0] = new AjaxControlToolkit.Slide("../Img/1.png", "First image of my album", "First Image");
            slides[1] = new AjaxControlToolkit.Slide("../Img/2.png", "Second image of my album", "Second Image");
            slides[2] = new AjaxControlToolkit.Slide("../Img/3.png", "Third image of my album", "Third Image");
            slides[3] = new AjaxControlToolkit.Slide("../Img/4.png", "Fourth image of my album", "Fourth Image");
            slides[4] = new AjaxControlToolkit.Slide("../Img/5.png", "Fifth image of my album", "Fifth Image");
            return (slides);
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </ajaxToolkit:ToolkitScriptManager>
    <table width="400px" align="center" height="350px" bgcolor="silver">
        <tr align="center">
            <td>
                <asp:Label ID="lableImageDetail" runat="server" ForeColor="#000000" />
            </td>
        </tr>
        <tr align="center">
            <td>
                <asp:Image runat="server" ID="image1" Height="250" Width="300" />
            </td>
        </tr>
        <tr align="center">
            <td>
                <asp:Button ID="buttonPrev" runat="Server" Text="Previous" Width="80px" />
                <asp:Button ID="buttonPlay" runat="server" Text="Play" Width="80px" />
                <asp:Button ID="buttonNext" runat="Server" Text="Next" Width="80px" />
            </td>
        </tr>
    </table>
    <ajaxToolkit:SlideShowExtender ID="SlideShowExtender2" runat="server" SlideShowServiceMethod="GetSlides"
        TargetControlID="image1" PlayButtonID="buttonPlay" NextButtonID="buttonNext"
        PreviousButtonID="buttonPrev" AutoPlay="true" StopButtonText="Stop" Loop="True"
        PlayInterval="1000">
    </ajaxToolkit:SlideShowExtender>
    </form>
</body>
</html>
